//
//  UINavigationController+Extesion.swift
//  Teamo
//
//  Created by mdzz on 2021/12/7.
//

import Foundation
import UIKit

public extension UINavigationController {
     var popGestureEnable: Bool {
        get {
            if let interactivePopGestureRecognizer = self.interactivePopGestureRecognizer {
                return interactivePopGestureRecognizer.isEnabled
            } else {
                return false
            }
        }
        set {
            if let interactivePopGestureRecognizer = self.interactivePopGestureRecognizer {
                interactivePopGestureRecognizer.isEnabled = newValue
            }
            if let navigation = self.navigationController {
                navigation.popGestureEnable = newValue
            }
        }
    }
}
